package hn.cch.mybatis.plus.constant;


import com.baomidou.mybatisplus.annotation.IEnum;

public enum Sex implements IEnum<Integer> {
    MALE(1, "男"),
    FEMALE(2, "女"),
    ;

    private Integer key;
    private String name;

    Sex() {
    }

    Sex(Integer key, String name) {
        this.key = key;
        this.name = name;
    }
    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public Integer getValue() {
        return key;
    }

    @Override
    public String toString() {
        return name;
    }
}
